home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / formats / wavefron.txt < prev    next >
Internet Message Format  |  1991-03-14  |  5KB

  1. From gautamm@ncsa.uiuc.edu Fri Mar 15 08:22:21 1991
  2. From: gautamm@ncsa.uiuc.edu (Gautam Mehrotra)
  3. Newsgroups: comp.graphics.visualization
  4. Subject: Wavefront's File format( was Re: apE and AVS pricing )
  5. Keywords: apE, AVS
  6. Date: 14 Mar 91 06:11:23 GMT
  7. Organization: NCSA - National Center for Supercomputing Applications
  8. Originator: gautamm@harriett
  9.  
  10. In article <1991Mar13.233202.25268@jarvis.csri.toronto.edu> drb@eecg.toronto.edu (David R. Blythe) writes:
  11. >In article <38945@netnews.upenn.edu> joe@retina.anatomy.upenn.edu (Joseph Panico) writes:
  12. >>in MOVIE.BYU format. Where can I get MOVIE.BYU and the data formats for
  13. >>both MOVIE.BYU and Wavefront's personal visualizer?
  14. >>
  15. >>                           Joe Panico
  16. [ description of MOVIE>BYU's format deleted]
  17. >I have seen a number of programs that understand this format so its probably
  18. >worth knowing.  So does anybody know the file formats for the personal
  19. >visualizer?
  20. >    david blythe
  21.  
  22.     Matthew Arrott posted a description of the format some time
  23. back. [ The Subject header on his article was mysteriously missing
  24. ..].  I am posting a copy for those who missed it .....
  25.  
  26. Matt's article follows ...
  27. -----------------------------------------------------------
  28.  
  29. If I am not mistaken one can call both institutions for this information.
  30.  
  31. The wavefront object format, if I remember correctly is the same as
  32. their advanced animation package.  That is as follows:
  33.  
  34.  
  35. #  This is a comment line
  36. #
  37. #  One moviable object per file.  In other words, a file is the atomic
  38. #    unit of a rigid body system
  39. #  The UNIX directory structure is used as the database structure
  40. #
  41. #  "\" The backlash character is used for line continuation
  42. #  "!" is used as an end of line comment
  43.  
  44. o square  ! object name : Not used in the advanced animation package [optional]
  45.  
  46. mtllib  my.mtl your.mtl project.mtl ...     ! material library search 
  47.                         ! path [optional]
  48. maplib my.map your.map ...                    ! map library search path
  49.                           ![optional]
  50.  
  51. usemtl red    ! current material : all subsequent geometry will be
  52.           ! assigned this material [optional]
  53. usemap logo ! current map  : all subsequent geometry will be assigned
  54.         ! this map [optional]
  55. usemap off   ! turn texture mapping off for subsequent geometry
  56.  
  57. # Maps are the definition of the application of textures to the material
  58. # properties of the object :
  59. #
  60. #      the mapping of the texture to the materials of the object
  61. #
  62. # This definition of the material/texture relationship is not the
  63. # definition of the uvw space of the
  64. #   texture to the xyz space of the geometry.  That definition is
  65. #   facilitated through texture verticies
  66. #   which are dicussed shortly.
  67. #
  68. #  Material and Map files have there own formats
  69. #  Material files are discussed after the object file.
  70.  
  71. s  1    ! smoothing group : average vertex normals for shared verticies
  72.     !of the same smoothing group
  73. s  off  ! turn smoothing  off
  74.  
  75. v  0.0  0.0  0.0     ! vertex position 
  76. v  1.0  0.0  0.0
  77. v  1.0  1.0  0.0
  78. v  0.0  1.0  0.0
  79.  
  80. vt  0.0  0.0  0.0    ! texture vertex position
  81. vt  0.0  1.0  0.0    
  82. vt  1.0  1.0  0.0
  83. vt  1.0  0.0  0.0
  84.  
  85. vn -1.0  -1.0  1.0  ! vertex normal : may override the smoothing notion,
  86.              !may need to be normalized
  87. vn  1.0  -1.0  1.0
  88. vn  1.0   1.0  1.0
  89. vn  -1.0  1.0  1.0
  90.  
  91. p 1 2 3 4               ! a series of four points made up of four index
  92.             ! references to verticies ( 1 base )
  93.  
  94. l  1 2 3 4               ! a line made up of four points with the
  95.              !topology of  vertex 1 to 2 to 3 to 4
  96.  
  97. f  1 2 3 4               ! a face (polygon) made up of four verticies.
  98.              !Counter clockwise ordering
  99.  
  100. f  1/1 2/2 3/3 4/4   ! a face with index references to texture verticies
  101.  
  102. f  1/1/1 2/2/2 3/3/3 4/4/4   ! a face with index references to texture
  103.                  !verticies and vertex normals
  104.  
  105. f  1//1 2//2 3//3 4//4           ! a face with index references to
  106.                   ! vertex normals
  107.  
  108. f  -4 -3 -2 -1          ! a face using relative vertex referencing. "-N"
  109.             ! reads: use N vertex ago
  110.  
  111. # vertices, texture verticies, vertex normals, points, lines, and face
  112. # can be intermixed as long
  113. #   as the referenced stuff is defined before it is referenced.
  114.  
  115. Material file
  116.  
  117. #  special characters are the same.
  118.  
  119. newmtl  red
  120. Ka  0.1 0.0 0.0         ! ambient color responce
  121. Kd  0.4 0.0 0.0         ! diffuse color responce
  122. Ks  0.4 0.0 0.0         ! spectular color
  123. Ns  20                      ! spectular exponent
  124. d  1.0                        ! dissolve   0.0 -- 1.0  transparent --
  125. opaque
  126. illum 1                     ! illumination model  0:color  1:diffuse ligthing
  127.                  ! 2:diffuse and spectular lighting
  128.  
  129.  
  130. ------------------------------------
  131.  
  132. End of Matt's article ....
  133.  
  134.  
  135. hope that helps
  136.  
  137. cheers,
  138. gautam
  139.  
  140. ---------------------------------------------------------
  141.  
  142. Gautam Mehrotra,
  143.  
  144. National Center for Supercomputing Applications, Univ of Illinois.
  145. e-mail:    gautamm@ncsa.uiuc.edu
  146.  
  147. ----------------------------------------------------------
  148.  
  149.